package iedcyt.acute.businessServices.requests;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
 
public class POSTDATA {
 
 
    public POSTDATA() {
    }
    public static void main(String[] args) {
        try {
        // Construct data
        String data = "fieldCount=3&action=search&product=WOS&search_mode=GeneralSearch&SID=W1oh4mPOkjAlk3%406lkd&max_field_count=25&max_field_notice=Notice%3A+You+cannot+add+another+field.&input_invalid_notice=Search+Error%3A+Please+enter+a+search+term.&input_invalid_notice_limits=+%3Cbr%2F%3ENote%3A+Fields+displayed+in+scrolling+boxes+must+be+combined+with+at+least+one+other+search+field.&sa_params=WOS%7Chttp%3A%2F%2Fapps.webofknowledge.com%2FInboundService.do%253Fproduct%253DWOS%2526mode%253DGeneralSearch%2526action%253Dtransfer%2526viewType%253Dinput%2526SID%253DW1oh4mPOkjAlk3%406lkd%2526inputbox%253Dinput%3F%3F%3F%7CW1oh4mPOkjAlk3%406lkd%7C%7C%5Bname%3DAU%3Bvalue%3DinitAuthor%3BkeyName%3D%3Btype%3DtermList%3Bpriority%3D10%2C+name%3DGP%3Bvalue%3DinitGroupAuthor%3BkeyName%3D%3Btype%3DtermList%3Bpriority%3D10%2C+name%3DSO%3Bvalue%3DinitSource%3BkeyName%3D%3Btype%3DtermList%3Bpriority%3D10%5D%27&sa_img_alt=Select+terms+from+the+index&value%28input1%29=spain&value%28select1%29=TS&value%28hidInput1%29=initVoid&value%28hidShowIcon1%29=0&value%28bool_1_2%29=AND&value%28input2%29=&value%28select2%29=AU&value%28hidInput2%29=initAuthor&value%28hidShowIcon2%29=1&value%28bool_2_3%29=AND&value%28input3%29=&value%28select3%29=SO&value%28hidInput3%29=initSource&value%28hidShowIcon3%29=1&x=39&y=11&limitStatus=collapsed&expand_alt=Expand+these+settings&expand_title=Expand+these+settings&collapse_alt=Collapse+these+settings&collapse_title=Collapse+these+settings&SinceLastVisit_UTC=&SinceLastVisit_DATE=&timespanStatus=display%3A+block&timeSpanCollapsedListStatus=display%3A+none&period=Range+Selection&range=ALL&startYear=1899&endYear=2011&defaultEditionsStatus=display%3A+none&defaultCollapsedListStatus=display%3A+inline&editions=SCI&editions=SSCI&editions=AHCI&editions=ISTP&editions=ISSHP&ssStatus=display%3Anone&ss_lemmatization=On&ss_query_language=&rsStatus=display%3Anone&rs_rec_per_page=10&rs_sort_by=PY.D%3BLD.D%3BVL.D%3BSO.A%3BPG.A%3BAU.A&rs_refinePanel=visibility%3Ashow";
 
        // Send data
        URL url = new URL("http://localhost/TUT/POSTDATA/post.php");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        wr.write(data);
        wr.flush();
 
        // Get the response
        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        while ((line = rd.readLine()) != null) {
            System.out.println(line);
        }
        wr.close();
        rd.close();
    } catch (Exception e) {
    }
    }
 
}
 